/* Homepage.module.css */
.container {
  max-width: 100%;
  margin: 0 auto;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  min-height: 100vh;
  padding-bottom: 60px;
}

.searchBar {
  background-color: #ff5a5f;
  padding: 12px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.searchInputContainer {
  display: flex;
  background-color: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.searchInput {
  flex: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 14px;
}

.searchButton {
  padding: 0 15px;
  background-color: transparent;
  border: none;
  color: #ff5a5f;
  font-weight: bold;
  cursor: pointer;
}

.mainContent {
  padding: 10px;
}

.bannerCarousel {
  position: relative;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bannerSlide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bannerSlide.active {
  opacity: 1;
}

.bannerContent {
  display: flex;
  height: 100%;
  padding: 20px;
  align-items: center;
  justify-content: space-between;
}

.bannerText {
  color: white;
  flex: 1;
}

.bannerText h2 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

.bannerText p {
  font-size: 14px;
  margin-bottom: 15px;
}

.bannerButton {
  background-color: white;
  color: #ff5a5f;
  border: none;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  cursor: button;
}

.bannerImage {
  width: 120px;
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.bannerDots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.dot.active {
  background-color: white;
}

.featureGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.featureItem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featureIcon {
  font-size: 24px;
  margin-bottom: 5px;
}

.featureName {
  font-size: 12px;
  color: #666;
}

.flashSaleSection {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sectionHeader {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.sectionTitle {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.titleIcon {
  margin-right: 5px;
}

.countdown {
  margin-left: 10px;
  background-color: #333;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.countdown span {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

.viewAll {
  margin-left: auto;
  font-size: 12px;
  color: #999;
  cursor: pointer;
}

.flashSaleProducts {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.categoryTabs {
  background-color: white;
  padding: 10px 15px;
  position: sticky;
  top: 60px;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tabsContainer {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding-bottom: 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabsContainer::-webkit-scrollbar {
  display: none;
}

.tabItem {
  text-align: center;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  position: relative;
  padding-bottom: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.tabItem.active {
  color: #ff5a5f;
  font-weight: 600;
}

.tabIndicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ff5a5f;
  border-radius: 1px;
}

.categoryContent {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.subCategoryTabs {
  background-color: white;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rankingSection {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recommendSection {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.updateInfo {
  font-size: 12px;
  color: #999;
  margin-left: 10px;
}

.recommendTag {
  font-size: 12px;
  color: #ff5a5f;
  margin-left: 10px;
  padding: 2px 6px;
  background-color: #ffeeee;
  border-radius: 4px;
}

.productGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.productCard {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.productCard:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.productImageContainer {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
}

.productImage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s;
}

.productCard:hover .productImage {
  transform: scale(1.05);
}

.productTag {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #ff5a5f;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

.productInfo {
  padding: 10px;
}

.productTitle {
  font-size: 14px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
  line-height: 20px;
}

.priceContainer {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.currentPrice {
  color: #ff5a5f;
  font-size: 16px;
  font-weight: 600;
}

.originalPrice {
  color: #999;
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 5px;
}

.productMeta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #999;
}

.sales {
  white-space: nowrap;
}

.rating {
  display: flex;
  align-items: center;
}

.ratingStars {
  color: #ffcc00;
  letter-spacing: 1px;
  margin-right: 2px;
}

.bottomNavigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.navItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #666;
  cursor: pointer;
  position: relative;
  padding: 5px 0;
  flex: 1;
}

.navItem.active {
  color: #ff5a5f;
}

.navIcon {
  font-size: 20px;
  margin-bottom: 2px;
}

.navText {
  font-size: 10px;
}

.navIndicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background-color: #ff5a5f;
  border-radius: 1px;
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
    margin: 0 auto;
  }
  
  .bannerCarousel {
    height: 200px;
  }
  
  .bannerText h2 {
    font-size: 24px;
  }
  
  .bannerText p {
    font-size: 16px;
  }
  
  .bannerButton {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .bannerImage {
    width: 160px;
    height: 160px;
  }
  
  .featureGrid {
    grid-template-columns: repeat(8, 1fr);
  }
  
  .productGrid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .rankingSection .productGrid,
  .recommendSection .productGrid {
    grid-template-columns: repeat(4, 1fr);
  }
}
